package com.zzzzzz.test.config;

import java.net.UnknownHostException;

import javax.inject.Inject;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;

import com.mongodb.Mongo;
import com.mongodb.MongoException;
import com.mongodb.MongoOptions;
import com.mongodb.ServerAddress;

@Configuration
public class DataConfig {
	@Inject
	private Environment environment;
	
//	@Bean
//	public Mongo mongo() throws UnknownHostException, MongoException {
//		ServerAddress addr = new ServerAddress(environment.getProperty("mongo.host"), environment.getProperty("mongo.port", Integer.class));
//		MongoOptions options = new MongoOptions();
//		return new Mongo(addr, options);
//	}

}
